package com.session01;

import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int flag;
        for (int i = 0; i < 3; i++) {
            String s1 = sc.nextLine();
            String s2 = sc.nextLine();
            flag = login(s1, s2);
            if (flag == 1) {
                break;
            }
        }
    }

    public static int login(String s1, String s2) {
        if (s1.equals("lovo") && s2.equals("012345")) {
            System.out.println("登陆成功");
            return 1;
        } else {
            System.out.println("账号错误，请再次尝试登陆");
            return 0;
        }
    }
}
